home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / copycomb / combo.asp < prev    next >
Encoding:
Text File  |  1998-07-17  |  1.3 KB  |  63 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE>CopyCom MSChart Demo</TITLE>
  4. </HEAD>
  5. <BODY BGCOLOR="#ffffff">
  6.  
  7. CopyCom/MSChart Demo
  8. <p>
  9.  
  10. <%
  11. 'Load combo.ocx which has the Eckler CopyCom and MSChart control. 
  12. Set combo = Server.CreateObject("ComboObj.Combo") 
  13.    
  14. nRow = 7
  15. nCol = 5
  16.  
  17. ReDim d(nRow, nCol)
  18.  
  19. 'Set title for each series on chart.
  20. d(1, 2) = "Mean"
  21. d(1, 3) = "Low"
  22. d(1, 4) = "Middle"
  23. d(1, 5) = "Top"
  24.  
  25. 'Set title for each col on chart.
  26. yr = Year(Now) - 1
  27. For i = nRow To 2 Step -1
  28.    d(i, 1) = Right(yr, 2) & "/" & Right((yr + 1), 2)
  29.    yr = yr - 1
  30. Next
  31.  
  32. randomize
  33.  
  34. 'Generate chart data.
  35. For i = nRow To 2 Step -1
  36.    d(i, 2) = Int(((85 - 15 + 1) * Rnd) + 15)    'point on line
  37.    d(i, 3) = Int(((40 - 20 + 1) * Rnd) + 20)    'cal low percentile
  38.    d(i, 4) = Int(((40 - 20 + 1) * Rnd) + 20)    'cal middle percentile
  39.    d(i, 5) = 100 - (d(i, 4) + d(i, 3))          'cal high percentile
  40. Next
  41.  
  42. 'Send chart data to MSChart.    
  43. combo.ChartData(d)
  44.  
  45. 'Copy MSChart image to gif file using CopyCom.
  46. combo.ComboCopy server.mappath("combo.gif")
  47. %>
  48.  
  49. <IMG SRC=/es/combo.gif>
  50. <p>
  51. <small>
  52. <%
  53. szDate = "Created " & Now & ", Copyright (c) 1996-1998 by Eckler Software. All rights reserved."
  54. %>
  55. <%=szDate%>
  56. </small>
  57.  
  58. <BR>
  59. <BR>
  60. <!--#include virtual="/es/srcform.inc"-->
  61.  
  62. </BODY>
  63. </HTML>